package dexter.core.common;

import dexter.net.msg.common.RequestParams;

public class InitParams implements RequestParams {

	private static final long serialVersionUID = -7842357671693022874L;
    private String gid;
    private byte[] classbytes;
    private boolean remote;
    
	public InitParams(String gid, byte[] classbytes, boolean remote) {
		this.gid = gid;
		this.classbytes=classbytes;
		this.remote = remote;
	}

	public String getId() {
		return gid;
	}
	
	public byte[] getClassBytes() {
        return classbytes;  		
	}
	
	public boolean isRemote() {
		return remote;
	}
	
    public String toString() {
    	String type = "local";
    	if (remote) type = "remote"; 
    	int bytes = 0;
    	if (classbytes!=null) bytes = classbytes.length;
    	return type+" test : gid ("+gid+") & "+bytes+"b";
    }

}